<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading">
			<ul class="breadcrumb">
				<li><a href="<{:U('setSMS')}>">短信设置管理</a> </li>
				<li>短信设置</li>
			</ul>
		</div>
		<div class="panel-body">
			<form id="myform" method="post"  class="form-horizontal" action="<{:U('setSMS')}>">
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">序列号：</label>
					<div class="col-sm-7">
						<input type="text" placeholder="序列号,请通过后台管理销售人员获得" class="form-control" id="keyword" name="keyword" value="<{$data['keyword']}>" />
					</div>
				</div>
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">密码：</label>
					<div class="col-sm-7">
						<input type="password" placeholder="密码,请通过后台管理销售人员获取" class="form-control" id="password" name="password" value="<{$data['password']}>">
					</div>
				</div>
				<div class="form-group">
					<label for="input-title" class="col-sm-2 control-label">测试手机号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" id="ceshiurl" name="ceshiurl" value="<{$data.ceshiurl}>"></div>
					<div class="col-sm-3" style="margin-top:3px;">	
						<a class="btn btn-primary btn-xs" onclick="testEmail()" >测试</a> 
					</div>	
						
					</div>
				 
				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-7">
						<button type="submit" class="btn btn-primary">保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
            keyword: {
                message: '序列号',
                validators: {
                    notEmpty: {
                        message: '序列号不能为空'
                    }, 
                }
            },
			 code: {
                message: '密码',
                validators: {
                    notEmpty: {
                        message: '密码不能为空'
                    }, 
                }
            },
			
			 

        }
    });
	
 
});
 </script> 
<script>
 function testEmail(){
  var ceshiurl=$("#ceshiurl").val();
  if(ceshiurl==""){
	 alert("请输入手机号");return false;  
  }
  $.get("<{:U('smsTest')}>",{tel:ceshiurl},function(){
   alert('已发送，如果已收到短信，说明您配置成功了');
  });
 }
</script> 
